package com.example.demo.mapper;

import com.example.demo.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDateTime;

/**
* @author denglianxi
* @description 针对表【orders】的数据库操作Mapper
* @createDate 2024-06-06 08:44:59
* @Entity com.example.demo.entity.Orders
*/
@Mapper
public interface OrderMapper extends BaseMapper<Orders> {

    @Update("update orders set status=#{status}, confirmed=2,update_time=#{now} where oid=#{oid}")
    void update(@Param("status") String status, @Param("oid")Long oid2, @Param("now") LocalDateTime now);

    @Update("update orders set commit = 2 , plus_comment = #{plusComment} where oid=#{orderId}")
    void updateCommit(@Param("plusComment") Integer plusComment,@Param("orderId") Long orderId);
}




